/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.pdx.cs.guavadata.subclass;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author VuTran
 */
public class DataSet {
    String name;
    public List<DataTable> tables;

    public DataSet() {
        tables = new ArrayList<DataTable>();
    }

    public DataSet(String name) {
        this.name = name;
        tables = new ArrayList<DataTable>();
    }

    public boolean containsTable(String name) {
        for (DataTable table : tables) {
            if (table.getName().equals(name))
                return true;
        }
        return false;
    }

    public DataTable getTable(String name) {
        for (DataTable table : tables) {
            if (table.getName().equals(name))
                return table;
        }
        return null;
    }

}
